package com.kaifamiao.N0721;

import java.util.Arrays;

public class Node5 {
    public static void main(String[] args) {
        int[] num = {1, 2, 3, 4, 5, 6};
        int node = 2;
        int x = 9;
        int[] newnums = Arrays.copyOf(num, num.length + 1);
        System.arraycopy(newnums, node , newnums, node+1, newnums.length - node - 1);
        newnums[node] = x;
        for (int i = 0; i < newnums.length; i++) {
            System.out.println(newnums[i]);
        }
    }
}
